import request from '@/utils/request'

export default {
    // 学生列表
    searchStu(pageNum, pageSize){
        return request({
            url:`/student/queryStu?pageNum=` + pageNum + `&pageSize=` + pageSize,
            method:'get'
        })
    },
    // 未添加过的学生列表
    searchStuNo(teaId){
        return request({
            url:`/student/queryStuNo?teaId=`+teaId,
            method:'get'
        })
    },
    // 老师列表
    searchTea(pageNum, pageSize) {
        return request({
            url:`/teacher/queryTea?pageNum=` + pageNum + `&pageSize=` + pageSize,
            method:'get'
        })
    },
    //添加学生
    addStu(addMap){
        return request({
            url:'/student/add',
            method:'post',
            data:addMap
        })
    },
    //添加老师
    addTea(addMap){
        return request({
            url:'/teacher/add',
            method:'post',
            data:addMap
        })
    },
    addStuAssTea(addJson) {
        return request({
            url:'/tea-ass-stu/add',
            method:'post',
            data:addJson
        })
    },
    deleteStu(id) {
        return request({
            url:'/student/delete?id=' + id,
            method:'delete'
        })
    },
    deleteTea(id) {
        return request({
            url:'/teacher/delete?id=' + id,
            method:'delete'
        })
    }
}